<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改【请填写功能名称】')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-check-edit" th:object="${zzOutProductCheck}">
            <input name="outProductCheckId" th:field="*{outProductCheckId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">验货人：</label>
                <div class="col-sm-8">
                    <input name="outProductCheckPerson" th:field="*{outProductCheckPerson}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">车牌号：</label>
                <div class="col-sm-8">
                    <select class="form-control" id="sel1" name="vehicleId">
                        <option>--请选择--</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出库单id：</label>
                <div class="col-sm-8">
                    <input name="outStoreId" th:field="*{outStoreId}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">验收状态：</label>
                <div class="col-sm-8">
                    <input name="outProductCheckStstus" th:field="*{outProductCheckStstus}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">验收时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="outProductCheckDatetime" th:value="${#dates.format(zzOutProductCheck.outProductCheckDatetime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">月台名称：</label>
                <div class="col-sm-8">
                    <select class="form-control" id="sel3" name="platformId">
                        <option>--请选择--</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/check";
        $("#form-check-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-check-edit').serialize());
            }
        }

        $("input[name='outProductCheckDatetime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $(function () {
            //查询空闲车辆
            $.post("/system/vehicle/list",{vehicleStatus:"空闲"},function (result) {
                for (var i in result.rows) {
                    $("#sel1").append("<option value='"+result.rows[i].vehicleId+"'>"+result.rows[i].vehicleCode+"</option>")
                }
            });
            //查询空闲月台
            $.post("/system/platform/list",{platformStatus:"空闲"},function (result) {
                for (var i in result.rows) {
                    $("#sel3").append("<option value='"+result.rows[i].platformId+"'>"+result.rows[i].platformName+"</option>")
                }
            })
        })
    </script>
</body>
</html>